1. Field of the Invention
The present invention relates to layer 2 and above switching of data packets in a non-blocking network switch configured for switching data packets between subnetworks.
2. Background Art
Local area networks use a network cable or other media to link stations on the network. Each local area network architecture uses a media access control (MAC) enabling network interface devices at each network node to access the network medium.
The Ethernet protocol IEEE 802.3 has evolved to specify a half-duplex media access mechanism and a full-duplex media access mechanism for transmission of data packets. The full-duplex media access mechanism provides a two-way, point-to-point communication link between two network elements, for example between a network node and a switched hub.
Switched local area networks are encountering increasing demands for higher speed connectivity, more flexible switching performance, and the ability to accommodate more complex network architectures. For example, commonly-assigned U.S. Pat. No. 5,953,335 discloses a network switch configured for switching layer 2 type Ethernet (IEEE 802.3) data packets between different network nodes; a received data packet may include a VLAN (virtual LAN) tagged frame according to IEEE 802.1q protocol that specifies another subnetwork (via a router) or a prescribed group of stations. Since the switching occurs at the layer 2 level, a router is typically necessary to transfer the data packet between subnetworks.
Efforts to enhance the switching performance of a network switch to include layer 3 (e.g., Internet protocol) processing may suffer serious drawbacks, as current layer 2 switches preferably are configured for operating in a non-blocking mode, where data packets can be output from the switch at the same rate that the data packets are received. Newer designs are needed to ensure that higher speed switches can provide both layer 2 switching and layer 3 switching capabilities for faster speed networks such as 100 Mbps or gigabit networks.
However, such design requirements risk loss of the non-blocking features of the network switch, as it becomes increasingly difficult for the switching fabric of a network switch to be able to perform layer 3 processing at the wire rates (i.e., the network data rate). For example, layer 3 processing evaluation of frame data relative to the start position of the layer 3 header. The start position, however, will vary based on the protocol of the layer 2 header, since each layer 2 protocol results in a layer 2 header having a corresponding length. Hence, network administrators may be faced with duplicating layer 3 templates for each layer 2 protocol encountered in the network, substantially increasing the memory requirements for the network switch.
There is a need for an arrangement that enables a network switch to provide layer 2 switching and layer 3 switching capabilities for 100 Mbps and gigabit links without blocking of the data packets.
There is also a need for an arrangement that enables a network switch to provide layer 2 switching and layer 3 switching capabilities with minimal buffering within the network switch that may otherwise affect latency of switched data packets.
There is also a need for an arrangement that enables a network switch to identifier layer 2 protocol for identification of a beginning of a layer 3 header for layer 3 and above processing.
These and other needs are attained by the present invention, where a network switch port includes a filter, also referred to as a packet classifier, configured for evaluating an incoming data packet on an instantaneous basis. The filter performs simultaneous comparisons between the incoming data stream of the data packet and multiple templates configured for identifying respective protocols. Each template is composed of a plurality of min terms, where each min term specifies a prescribed comparison operation with a selected data byte of the incoming data packet. The filter includes a layer 2 frame identifier module configured for determining a protocol of the received layer 2 header, and a min term controller configured for identifying a beginning of the layer 3 header based on the determined protocol of the layer 2 header. The min term controller accesses the min terms based on the ordering of the data bytes, such that the min terms that are used to compare the first data byte of the layer 3 header are first accessed for comparison with the first data byte as the first data byte is received; the min terms used to compare the second data byte of the layer 3 header are then accessed for comparison with the second data byte as the second data byte is received. Hence, the filter simultaneously compares the min terms that correspond to the selected byte of the incoming data packet as the selected byte is received by the network switch port. The results of the comparisons between the min terms and the selected data bytes of the incoming data stream are evaluated by an equation core within the filter, which determines comparison results for the templates and outputs a tag to the switching core, providing the switching core with information on how to process the received data packet. Hence, the switching core has sufficient time to perform layer 2 or layer 3 switching of the received data packet in a non-blocking manner in a high-speed data network.
One aspect of the present invention provides a method of evaluating an incoming data packet at a network switch port. The method includes determining a layer 2 header format of the incoming data packet, and identifying a beginning of a layer 3 header in the incoming data packet based on the determined layer 2 header format. The method also includes simultaneously comparing selected bytes, relative to the beginning of the layer 3 header, to min terms for identification of prescribed user-selected attributes based on determined matching min terms. The determination of the layer 2 header format and identification of the beginning of the layer 3 header minimizes the number min terms that need to be stored for identification of the prescribed user-selected attributes. Hence, a single set of min terms can be used to perform evaluations of the incoming data packet, regardless of the layer 2 header format.
Another aspect of the present invention provides a network switch port filter configured for evaluating an incoming data packet. The network switch port filter includes a min term memory configured for storing min term values, each min term value stored based on a location of a corresponding selected byte of the incoming datapacket for comparison relative to a beginning of a layer 3 header, an evaluation portion specifying a corresponding comparison operation, and a equation identifier field that specifies templates that use the corresponding min term. The network switch port filter also includes a frame type identifier configured for identifying a format of a layer 2 header of the incoming data packet for location of the beginning of the layer 3 header, and a min term generator configured for simultaneously comparing a received byte of the incoming data packet with the min terms that correspond to the received byte and generating respective min term comparison results based on the identified format.
Additional advantages and novel features of the invention will be set forth in part in the description which follows and in part will become apparent to those skilled in the art upon examination of the following or may be learned by practice of the invention. The advantages of the present invention may be realized and attained by means of instrumentalities and combinations particularly pointed in the appended claims.